import type { IPage, IArticle } from '@/types'
import request from '@/utils/https'

export function getArticles(data: IPage) {
  return request<IArticle[]>({
    url: '/art/list',
    method: 'post',
    data
  })
}
export function getLesson(id: string) {
  return request<{ article: IArticle, comment: { id: string }, homeWork: number }>({
    url: `/art/info/${id}`,
    method: 'get'
  })
}
